import request from '@/utils/http.js'

// 获取仓库列表
export const getWareListApi = (params) => {
  return request({
    url: 'wms/backend/wareInfo/list',
    method: "GET",
    params: params,
  })
}

// 根据id获取仓库信息
export const getWareInfoByIdApi = (id) => {
  return request({
    url: `wms/backend/wareInfo/info/${id}`,
    method: "GET",
  })
}

// 保存仓库地址
export const saveWareInfoApi = (data) => {
  return request({
    url: 'wms/backend/wareInfo/save',
    method: "POST",
    data: JSON.stringify(data),
  })
}

// 修改仓库信息
export const updateWareInfoApi = (data) => {
  return request({
    url: 'wms/backend/wareInfo/update',
    method: "PUT",
    data: JSON.stringify(data),
  })
}

// 删除仓库信息
export const deleteWareInfoApi = (ids) => {
  return request({
    url: 'wms/backend/wareInfo/delete',
    method: "DELETE",
    data: JSON.stringify(ids),
  })
}

// 所有仓库信息
// export const getWareAllApi = () => {
//   return request({
//     url: 'wms/backend/wareInfo/all',
//     method: "GET",
//   })
// }